Workday to Work.com (Salesforce) Employee Data - Implementation Template
How to: Bulk and delta loads
This template supports both the initial load and the subsequent delta loads. To just do the delta load, use a switch, based on the property isInitialLoadRequired
. This property is defined in each environmentâs configuration YAML file, and is set to âtrueâ by default. If isInitialLoadRequired
property is âtrueâ and lastUpdatedTimeStamp
in watermark is the default expression, then the Mule application will retrieve only the active workers from Workday. If the need is only for delta loads, then set isInitialLoadRequired
to false in each environmentâs configuration YAML file.
Sequence of the load
Due to hierarchical relationship among different entities, the data load needs to follow a specific sequence. Before loading the Employee data, please make sure that the Organization and Location data is loaded.
![](https://anypoint.mulesoft.com/exchange/org.mule.examples/workday2sfdc-employee-migration/1.1.0/resources/image-5bb31ccc-401e-4f0f-8619-5a6990f257b3.png)
To perform the initial bulk load and subsequent delta loads
This template queries Workday for all existing active employees in the first scheduled run, and all employee updates for subsequent delta runs that match the filtering criteria. The filtering criteria are based on manipulations starting from a transaction date range, record count to pagination.
Sequence of the employee data load
To perform delta loads only
This template queries Workday for all updates on the employees (including active and inactive) that match the filtering criteria. The filtering criteria is based on manipulations starting from a transaction date range, record count, and pagination.
Employee data retrieved from Workday is not organized in a hierarchical manner (eg. response data is not organized from CEO to an individual contributor). This hierarchical relationship must be established using the ManagerId that is defined as a âHierarchyâ data type in Salesforce.
To achieve this, the Mule application will process the data from Workday in two steps:
- Stage one: Once the employee data is fetched from Workday in a batch, load employee information into Salesforce without ManagerId and store EmployeeNumber and Managerâs EmployeeNumber in Anypoint Object Store with a unique key. Repeat this for each batch of results from Workday.
- Stage two: After loading employee data without ManagerId into Salesforce successfully, retrieve key-value pairs from Object Store, which contains the EmployeeNumber and the Managerâs EmployeeNumber. Fetch ManagerId in Salesforce using Managerâs EmployeeNumber and update ManagerId for each employee using the bulk upsert.
During the process of Employee data loading, the assoicated LocationName and OrganizationCode would be retreived and update to the employee records.
Reminder: Both Organization and Location data load must be completed before Employee data load. Employee data load process builds the relationship between employee and location/organization.